'''
title: 生成由字母组成的等腰三角形
author: 十一
datetime: 20191129 115300
'''

def isosceles_triangle(num):
    s = 'abcdefghijklmnopqrstuvwxyz' * (num // 26 + 1)
    for i in range(1, num + 1):
        print('{0:^{1}}'.format(s[:i] + s[:i - 1][::-1], num * 2 -1))

